package framework.filters;

import framework.pipes.PullPipe;
import framework.pipes.PushPipe;

/**
 * 
 * @author Wetzel & Rusch
 * 
 * @param <T>
 *            Incoming data type
 * @param <K>
 *            Outgoing data type (edited data)
 */
public abstract class AbstractActiveFilter<T, K> implements ActiveFilter<T, K>,
		Runnable {
	protected PullPipe<T> m_pullPipe;
	protected PushPipe<K> m_pushPipe;
	protected T m_inputData;
	protected K m_outputData;

	public AbstractActiveFilter(PullPipe<T> pullPipe, PushPipe<K> pushPipe) {
		m_pullPipe = pullPipe;
		m_pushPipe = pushPipe;
	}

	public T pull() {
		return m_inputData;
	}

	public void push(K data) {
		m_pushPipe.push(data);
	}
}